package com.hfb.mashibing.alip8.spring.annotation;

import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Target({ElementType.FIELD,ElementType.METHOD})
@Retention(RetentionPolicy.CLASS)
@Inherited
public @interface MyAnnotation {

    String name() default  "zhanshan";
}

class Test {
    @MyAnnotation(name="china")
    private String name;

    @MyAnnotation
    private void say(){

    }
}
